from py_page.base_page import BasePage


class CartPage(BasePage):

    # 获取购物车中所有商品的名称列表
    def get_goods_name_list(self):
        goods_eles = self.finds("xpath", "//*[@class='name line2']")
        goods_name_list = [goods.text for goods in goods_eles]
        return goods_name_list
